package com.jctrip.hotel.source.client;

import java.util.List;

import com.jctrip.hotel.source.model.rezen.req.*;
import com.jctrip.hotel.source.model.rezen.resp.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author henry
 * @Date 2023/8/11 09:43
 * @Description
 */
@FeignClient(name = "RezenClient", url = "${feign.url.rezen}")
@RequestMapping(headers = {"accept=application/json", "Content-Type=application/json"})
public interface RezenClient {
    @PostMapping("default/hotel/citylist")
    RezenBaseResp<List<CityInfoDTO>> getCityList(@RequestBody RezenQueryCityReq req,
                                                 @RequestHeader("Lc-Sid") String secretId,
                                                 @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    // todo 接口弃用
    @PostMapping("default/hotel/hotelShowList")
    RezenBaseResp<List<HotelInfoDTO>> queryHotelList(@RequestBody QueryHotelReq req,
                                                     @RequestHeader("Lc-Sid") String secretId,
                                                     @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("default/hotel/hotelList")
    RezenBaseResp<List<HotelInfoIdDTO>> queryHotelList2(@RequestBody HotelListReq req,
                                                        @RequestHeader("Lc-Sid") String secretId,
                                                        @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);


    @PostMapping("/default/hotel/hotelListForCompany")
    RezenBaseResp<List<HotelInfoIdDTO>> queryHotelListForCompany(@RequestBody HotelListReq req,
                                                                 @RequestHeader("Lc-Sid") String secretId,
                                                                 @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("/default/hotel/hotelDetails")
    RezenBaseResp<HotelDetailsResp> queryHotelDetails(@RequestBody HotelDetailsReq req,
                                                        @RequestHeader("Lc-Sid") String secretId,
                                                        @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("/distribution/product/getCompanyList")
    RezenBaseResp<List<GetCompanyListResp>> getCompanyList(@RequestBody HotelListReq req,
                                                      @RequestHeader("Lc-Sid") String secretId,
                                                      @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("distribution/product/productBriefListByCompanyId")
    RezenBaseResp<List<ProductBriefListByCompanyIdResp>> getRoomTypeByCompanyId(@RequestBody ProductBriefListByCompanyIdReq req,
                                           @RequestHeader("Lc-Sid") String secretId,
                                           @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("distribution/product/productListByCompanyId")
    RezenBaseResp<List<ProductListByCompanyIdResp>> getProductListByCompanyId(@RequestBody ProductListByCompanyIdReq req,
                                                 @RequestHeader("Lc-Sid") String secretId,
                                                 @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("distribution/product/productBriefList")
    RezenBaseResp<RoomTypeDTO> getRoomType(@RequestBody ProductBriefListReq req,
                                           @RequestHeader("Lc-Sid") String secretId,
                                           @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("distribution/product/productList")
    RezenBaseResp<ProductListDTO> getProductList(@RequestBody QueryProductListReq req,
                                                 @RequestHeader("Lc-Sid") String secretId,
                                                 @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("/distribution/product/checkPriceAndCount")
    RezenBaseResp<List<PostOrderCheckDTO>> checkPriceAndCount(@RequestBody PostOrderCheckReq req,
                                                        @RequestHeader("Lc-Sid") String secretId,
                                                        @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("distribution/order/reserveOrder")
    RezenBaseResp<RezenOrderResp> reserveOrder(@RequestBody RezenPostOrderReq req,
                                               @RequestHeader("Lc-Sid") String secretId,
                                               @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("distribution/order/pullOrderStatus")
    RezenBaseResp<QueryOrderStatusDTO> queryOrderStatus(@RequestBody RezenQuerOrderReq req,
                                                        @RequestHeader("Lc-Sid") String secretId,
                                                        @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("distribution/order/cancelOrder")
    RezenBaseResp<RezenCancelOrderDTO> cancelOrder(@RequestBody RezenCancelOrderReq req,
                                                   @RequestHeader("Lc-Sid") String secretId,
                                                   @RequestHeader("Lc-Ts") Long timestamp, @RequestHeader("Lc-Sign") String signing);

    @PostMapping("/distribution/order/pullOrderInhotelInfo")
    RezenBaseResp<RezenPullOrderInhotelInfoResp> pullOrderInhotelInfo(@RequestBody RezenPullOrderInhotelInfoReq req,
                                                                      @RequestHeader("Lc-Sid") String secretId,
                                                                      @RequestHeader("Lc-Ts") Long timestamp,
                                                                      @RequestHeader("Lc-Sign") String signing);
}
